home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Classic Games for OS/2 Warp
/
Classic Games for OS2 Warp (1995)(IBM).iso
/
fpclean.cmd
next >
Wrap
OS/2 REXX Batch file
|
1995-07-11
|
1KB
|
44 lines
/* Cleanup the directories (if any) left on the drives: */
rc = RxFuncAdd( "SysDriveMap", "RexxUtil", "SysDriveMap" )
rc = RxFuncAdd( "SysFileTree", "RexxUtil", "SysFileTree" )
rc = RxFuncAdd( "SysDriveInfo", "RexxUtil", "SysDriveInfo" )
rc = RxFuncAdd( "SysFileDelete", "RexxUtil", "SysDeleteFile" )
/* Search Drives for home Dir: */
Map = SysDriveMap( , "LOCAL" )
Dir = "\FUNPAK"
Done.0 = 0 /*Keep track of which objects were created*/
Uninst = 0
Do I=1 to Words(Map)
Drive = Strip( Word(Map, I) )
/* Check if Drive is Accessable */
If ( (SysDriveInfo(Drive) \= "" ) & ,
(Strip(Word(SysDriveInfo, 2)) \= "0") ) then Do
Say "Checking Drive: " || Drive
/* get directories under home dir: */
rc = SysFileTree( Drive || Dir || "\*.*", "File.", "FO" )
rc = SysFileTree( Drive || Dir || "\*.*", "Dir.", "DO" )
If ( (File.0 > 0) & (Dir.0 == 0) ) Then Do
/* FunPak directory found, but no subdirs were found */
/* underneath it - no apps are installed. Remove the \FUNPAK */
/* directory and files therein. */
Say " Cleaning Drive: " || Drive
"@" || Drive
"@cd \"
"@echo y | del " || Drive || Dir
"@rd " || Drive || Dir
End
End
End
""Exit